﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/AdminSite.Master"
    Inherits="System.Web.Mvc.ViewPage<Veteran_cms.Models.news_article>" %>

<%@ Import Namespace="Veteran_cms.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <!-- Validation form -->
    <%using (Html.BeginForm("Details", "ManageNews", new { id = Model.article_id }, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form", id = "validate" }))
      { %>
    <!-- Multiple files uploader -->
    <fieldset>
        <div>
            <div class="widget">
                <div style="float: right">
                    <a href="<%=Url.Action("IndexNews","ManageNews") %>" title="" class="backTo" style="margin: 5px;">
                        <img src="../../images/adminSite/icons/prev.png" alt="" class="icon" /><span>Trở về</span></a></div>
                <div class="title">
                    <img src="../../Images/adminSite/icons/dark/pencil.png" alt="" class="titleIcon" /><h6>
                        Thông tin tin tức - thời sự</h6>
                </div>
                <%if (ViewData["Msg"] != null)
                  {%>
                <div class="nNote nSuccess hideit">
                    <p>
                        <strong>
                            <%=ViewData["Msg"]%></strong></p>
                </div>
                <%} %>
                <div class="formRow">
                    <label>
                        Tiêu đề:<span class="req">*</span></label>
                    <div class="formRight">
                        <%:Html.TextBoxFor(model => model.title, new { @class = "validate[required,maxSize[255]]", id = "req" })%></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="formRow">
                    <label>
                        Tiêu đề:<span class="req">*</span></label>
                    <div class="formRight">
                        <%:Html.TextBoxFor(model => model.sub_title, new { @class = "validate[required,maxSize[255]]", id = "req" })%></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="formRow">
                    <label>
                        Diễn giải:<span class="req">*</span></label>
                    <div class="formRight">
                        <%:Html.TextAreaFor(model => model.description, new { @class = "validate[required]", id = "textareaAutoGrow", rows = "4", cols = "" })%></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="formRow">
                    <label>
                        Nội dung:<span class="req">*</span></label>
                    <div class="formRight">
                        <%:Html.TextBoxFor(model => model.content, new { @class = "validate[required]", id = "textareaAutoGrow", rows = "4", cols = "" })%></div>
                    <div class="clear">
                    </div>
                </div>
                <div class="formRow">
                    <label>
                        Tác giả:<span class="req">*</span></label>
                    <div class="formRight">
                        <%:Html.TextBoxFor(model => model.author, new { @class = "validate[required,maxSize[255]]", id = "req" })%></div>
                    <div class="clear">
                    </div>
                </div>
            </div>
            <div class="formRow">
                <label>
                    Thư mục cha:<span class="req">*</span></label>
                <div class="formRight">
                    <%:Html.DropDownListFor(model => model.category_id, ViewData["categoryPanrent"] as SelectList)%></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <label>
                    Hình ảnh large:<span class="req">(353x258)*</span></label>
                <div class="formRight">
                    <img src="<%=Model.image_large %>" alt="<%=Model.title%>" /></div>
                <div class="formRight">
                    <input type="file" id="file6" name="uploadFile" /></div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <div class="formRight">
                    <%=Html.CheckBoxFor(mode=> mode.is_hot) %><label for="check1">Tin hot</label>
                </div>
                <div class="clear">
                </div>
            </div>
            <div class="formRow">
                <div class="formRight">
                    <%=Html.CheckBoxFor(mode=>mode.allow_comment) %><label for="check1">Cho phép nhận xét</label>
                </div>
                <div class="clear">
                </div>
            </div>
        </div>
        <div class="formRow">
            <label>
                Ngày hiển thị:<span class="req">*</span></label>
            <div class="formRight">
                <%=Html.TextBoxFor(mode => mode.show_date, new { @class = "validate[required]", id = "datepicker", name = "datepicker", @readonly = "readonly", Value = String.Format("{0:d}", Model .show_date) })%>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="formRow">
            <label>
                Thuộc tag:<span class="req">*</span></label>
            <div id="styleautocomplete" class="formRight">
                <ul id="ulSelected">
                    <li id="liautocomplete">
                        <input type="text" id="name-list" onclick="this.value=''" onkeypress="ResetTextbox(event)"
                            style="border: 0px; width: 150px; float: none;" /></li>
                </ul>
            </div>
            <div class="clear">
            </div>
        </div>
        <div class="widget">
            <div style="float: left">
                <a href="<%=Url.Action("Create","ManageComment",new { objectId = Model.article_id ,commentType=CommentTypes.News}) %>"
                    title="" class="button greyishB" style="margin: 5px;">
                    <img src="../../images/adminSite/icons/light/create.png" alt="" class="icon" /><span>Nhận
                        xét</span></a></div>
            <%using (Html.BeginForm("Delete", "ManageNews", new { id = Model.article_id }, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form" }))
              { %>
            <div class="formSubmit">
                <input type="submit" value="Xóa" class="redB" /></div>
            <div class="formSubmit">
                <input type="submit" value="Cập nhật" class="blueB" /></div>
            <div class="clear">
            </div>
            <div>
                <%:Html.HiddenFor(model => model.article_id)%></div>
            <%} %>
        </div>
        <%} %>
    </fieldset>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="TitleAreaPlaceHolder" runat="server">
</asp:Content>
